/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package smartgrid;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class PriceCriteria extends AbstractORMCriteria {
	public final IntegerExpression ID;
	public final IntegerExpression StartHour;
	public final IntegerExpression StartMinute;
	public final FloatExpression Euros;
	public final IntegerExpression EndHour;
	public final IntegerExpression EndMinute;
	
	public PriceCriteria(Criteria criteria) {
		super(criteria);
		ID = new IntegerExpression("ID", this);
		StartHour = new IntegerExpression("StartHour", this);
		StartMinute = new IntegerExpression("StartMinute", this);
		Euros = new FloatExpression("Euros", this);
		EndHour = new IntegerExpression("EndHour", this);
		EndMinute = new IntegerExpression("EndMinute", this);
	}
	
	public PriceCriteria(PersistentSession session) {
		this(session.createCriteria(Price.class));
	}
	
	public PriceCriteria() throws PersistentException {
		this(smartgrid.SmartgridPersistentManager.instance().getSession());
	}
	
	public TariffCriteria createTariff_Prices_roleCriteria() {
		return new TariffCriteria(createCriteria("Tariff_Prices_role"));
	}
	
	public Price uniquePrice() {
		return (Price) super.uniqueResult();
	}
	
	public Price[] listPrice() {
		java.util.List list = super.list();
		return (Price[]) list.toArray(new Price[list.size()]);
	}
}

